package com.uphone.magicleafteacher.pro.adapter;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.radish.baselibrary.Intent.IntentUtils;
import com.uphone.magicleafteacher.R;
import com.uphone.magicleafteacher.pro.activity.MytrainingdetailsActivity;
import com.uphone.magicleafteacher.pro.activity.listenertraining.ListenerTrainingActivity;
import com.uphone.magicleafteacher.pro.activity.listenertrainscore.ListenerTrainScoreActivity;
import com.uphone.magicleafteacher.util.CommonUtil;
import com.uphone.magicleafteacher.view.MyBaseViewHolder;
import com.uphone.magicleafteacher.vo.AudioSubmitBean;

import java.util.List;

public class ListenerTrainAdapter extends BaseQuickAdapter<AudioSubmitBean.AudioWorkListBean, MyBaseViewHolder> {

    public ListenerTrainAdapter() {
        super(R.layout.item_listener_train);
    }


    @Override
    protected void convert(@NonNull MyBaseViewHolder helper, AudioSubmitBean.AudioWorkListBean item) {
        helper.setText(R.id.tv_title, "  " + CommonUtil.getStr(item.getStudentName()) + "  ");
        helper.setText(R.id.tv_time, CommonUtil.getStr(item.getSubmitTime()));
        int remakStatus = item.getRemakStatus();
//        0: 未批改, 1: 已经批改通过, 2:批改拒绝, 3:已经打分
        if (remakStatus == 3) {
            helper.setText(R.id.tv_state, "已批改")
                    .setTextColor(R.id.tv_state, mContext.getResources().getColor(R.color.themecolor));
        } else {
            helper.setText(R.id.tv_state, "未批改")
                    .setTextColor(R.id.tv_state, mContext.getResources().getColor(R.color.tecolor));
        }
    }
}
